<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2018/7/11
  Time: 13:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>

    <meta charset="utf-8">
    <title>Fullscreen Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- CSS -->
    <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=PT+Sans:400,700'>
    <link rel="stylesheet" href="/static/assets/css/reset.css">
    <link rel="stylesheet" href="/static/assets/css/supersized.css">
    <link rel="stylesheet" href="/static/assets/css/style.css">

    <link rel="stylesheet" type="text/css" href="/static/js/jquery-easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/js/jquery-easyui/themes/icon.css">
    <script type="text/javascript" src="/static/js/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>

    <script type="text/javascript">
        $(function(){
            $("#login").click(function(){
                $("#loginForm").form("submit",{
                    url:"/login",
                    success:function(data){
                        console.log(data);
                        data = $.parseJSON(data);
                        if(data.success){
                            window.location.href="main";
                        }else{
                            $.messager.alert("提示",data.msg,"error");
                        }
                    }
                })

            });
        })
    </script>


</head>

<body>
<div class="page-container">
    <h1>Login</h1>
    <form method="post" id="loginForm" >
        <input type="text" name="username" class="username" placeholder="Username" value="admin">
        <input type="password" name="password" class="password" placeholder="Password" value="666">
        <button type="button" id="login">Sign me in</button>
        <div class="error"><span>+</span></div>


    </form>
    <div class="connect">
        <p>Or connect with:</p>
        <p>
            <a class="facebook" href=""></a>
            <a class="twitter" href=""></a>
        </p>
    </div>
</div>
<!-- Javascript -->
<script src="/static/assets/js/supersized.3.2.7.min.js"></script>
<script src="/static/assets/js/supersized-init.js"></script>
<script src="/static/assets/js/scripts.js"></script>

</body>
</html>
